<?php
namespace app\common\validate;

use think\Validate;

class LeaveValidate extends Validate
{
    protected $rule =   [
        'leave_type_id|类型'  => 'require|number',
        'start_time|开始时间' => 'require|date',
        'end_time|结束时间'   => 'require|date',
        'reason|原因'         => 'length:1,200',
    ];
    
    protected $scene = [
        /** api */
        'add'    => ['start_time', 'end_time', 'leave_type_id', 'reason'],
    ];
}